#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    setupUI();
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::setupUI()
{
    QString url = "rtmp://live.hkstv.hk.lxdns.com/live/hks";

    ui->lineEditUrl->setText(url);


}

void MainWindow::on_pushButtonPlay_clicked()
{
    QString url = ui->lineEditUrl->text();
    ui->widgetVideo1->open(url);
    //ui->widgetVideo2->open(url);
}

void MainWindow::on_pushButtonStop_clicked()
{
    ui->widgetVideo1->close();
    //ui->widgetVideo2->close();
}
